<template>
  <div>
    <div class="icon">
      <i class="el-icon-edit"></i>
      学生课程
    </div>
    <div class="tables">
      <el-row>
        <el-col :span="24">
          <el-table
            :data="tableData"
            stripe
            style="width: 100%">
            <el-table-column
              prop="courseId"
              label="选课ld"
              width="180">
            </el-table-column>
            <el-table-column
              prop="courseName"
              label="课程名"
              width="180">
            </el-table-column>
            <el-table-column
              prop="courseGrade"
              label="年级">
            </el-table-column>
            <el-table-column
              prop="courseCredit"
              label="学分">
            </el-table-column>
            <el-table-column
              prop="courseTime"
              label="上课时间">
            </el-table-column>
            <el-table-column
              prop="courseLocation"
              label="上课地点">
            </el-table-column>
            <el-table-column
              prop="courseSelectedCount"
              label="上课人数">
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
    </div>
  </div>
</template>


<script>
  import {get, post} from "../../../common/request";

  export default {
    name: "TeacherCourse",
    data() {
      return {
        tableData: []
      }
    },
    methods: {
      getData() {
        get("/rc-teacher/getTeacherCourse").then(x => {
          // console.log(x)
          this.tableData = x.data
        })
      }
    },
    mounted() {
      this.getData();
    }
  }
</script>


<style scoped>
  .icon {
    color: dimgray;
    line-height: 20px;
    text-align: left;
  }

  .tables {
    background-color: white;
    border-radius: 5px;
    border: 1px solid lightgrey;
    margin-top: 10px;
    padding: 10px 30px 10px 30px;
  }

  .input {
    width: 180px;
  }
</style>
